<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    @charset "utf-8";

    * {
      margin: 0;
      padding: 0;
    }

    li,
    ul {
      list-style: none;
    }

    .wrap {
      width: 724px;
      height: 362px;
      margin: 50px auto;
      box-sizing: border-box;
    }

    .wrap h3 {
      text-align: center;
      line-height: 48px;
    }

    #main {
      width: 100%;
      height: 100%;
      display: flex;
      flex-flow: row;
      box-sizing: border-box;
      justify-content: center;
    }

    .main {
      flex: 0 0 50%;
      display: flex;
      flex-flow: wrap;
      box-sizing: border-box;
    }

    .box {
      background-color: #fff;
      border: 1px solid #ddd;
      box-sizing: border-box;
    }

    .box p {
      width: 70px;
      line-height: 71px;
      text-align: center;
    }

    .control {
      width: 100%;
      margin-top: 20px;
      display: flex;
      flex-flow: row;
      justify-content: space-between;
    }

    .top {
      flex: 0 0 50%;
      padding: 0 15px;
      overflow: scroll;
    }

    .top li {
      display: flex;
      flex-flow: row;
      justify-content: space-around;
      border-bottom: 1px solid #ddd;
      margin-bottom: 8px;
    }

    .top li span {
      display: block;
      flex: 1;
      text-align: center;
    }

    .main li {
      -webkit-touch-callout: none;
      /* iOS Safari */
      -webkit-user-select: none;
      /* Chrome/Safari/Opera */
      -khtml-user-select: none;
      /* Konqueror */
      -moz-user-select: none;
      /* Firefox */
      -ms-user-select: none;
      /* Internet Explorer/Edge */
      user-select: none;
      /* Non-prefixed version, currently
      not supported by any browser */
    }
  </style>
</head>

<body>
<div id="app">
  <div class="wrap">
    <h3>15秒注意力大考验</h3>
    <div id="main">
      <ul class="main">
        <li class="box" v-for='(item,i) in items' :key='i' @click='clickBox(item,i)' ref='li'>
          <p>{{item.val}}</p>
        </li>
        <div class="control">
          <button @click="startGame">开始/重置游戏</button>
          <p>用时：{{runTime}} 秒</p>
        </div>
      </ul>

    </div>
  </div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="./js/numgame.js"></script>

</body>

</html>